//#########################################################################
//                              WackiEngie
//           Copyright (c) 2014 Marc Wacker. All rights reserved.
//#########################################################################

#pragma once

#include "WeTexture.h"

namespace WackiEngine
{

	class TextureCube : public Texture
	{
	public:
		TextureCube();
		TextureCube(
			GLint format, 
			GLsizei width, 
			GLsizei height,
			GLenum srcDataFormat = GL_RGBA, 
			GLenum srcDataType = GL_UNSIGNED_BYTE,
			const GLvoid *srcDataXp = (const GLvoid*) 0,
			const GLvoid *srcDataXn = (const GLvoid*) 0,
			const GLvoid *srcDataYp = (const GLvoid*) 0,
			const GLvoid *srcDataYn = (const GLvoid*) 0,
			const GLvoid *srcDataZp = (const GLvoid*) 0,
			const GLvoid *srcDataZn = (const GLvoid*) 0
		);

		static void		bindNone();
		void			image(
							GLenum face,
							GLint level,
							GLint format, 
							GLsizei width, 
							GLsizei height, 
							GLenum srcDataFormat = GL_RGBA, 
							GLenum srcDataType = GL_UNSIGNED_BYTE,
							const GLvoid *srcData = (const GLvoid*) 0
						);

		void			subImage(
							GLenum face,
							GLint level,
							GLint xOffset,
							GLint yOffset,
							GLsizei width, 
							GLsizei height, 
							GLenum srcDataFormat,
							GLenum srcDataType,
							const GLvoid *srcData
						);
	private:
		explicit TextureCube(const TextureCube&);
		TextureCube& operator=(const TextureCube&);
	};
	
	inline void TextureCube::bindNone()
	{
		Texture::bindNone(GL_TEXTURE_CUBE_MAP);
	}
}